/**
 * 首页api
 */
import {http} from '../../service/request/index.js' //请求拦截

/**
 * 
 * @returns {Promise}
 */
export function getPlan(){
    let datas = {'authorId':'us191001666'}
	let config = {
		header:{
			"isLogin":true //不用检测是否需要登录权限
		}
	}
    //#ifndef MP-WEIXIN
    //let e = http.get("/mock/login.json",datas,config);
    //#endif
    //#ifdef MP-WEIXIN
    let e = http.get("user/plan/findByAuthorId",datas,config);
    //#endif
    return e;
}

export function savePlan(data){
	let datas = data
		let config = {
			header:{
				"isLogin":true //不用检测是否需要登录权限
			}
		}
		// #ifndef MP-WEIXIN
	//    let e = http.get("/mock/login.json",datas,config);
		// #endif
		//#ifdef MP-WEIXIN
		let e = http.post("user/plan/savePlan",datas,config);
		//#endif
	   return e;
}